<template>
  <div>
    <button @click="increment">1+counter{{counter}}</button>
    <button @click="unm=asd(unm)">{{ unm }}</button>
  </div>
</template>

<script setup>
import {provide, ref} from "vue";
// 封装多个方法
import {localStorageWatch,asd} from '../components/localIndex'
const name = ref('name')
let counter = ref(17)
// 封装多个方法
let unm = ref(17)

provide('name',name)
provide('counter',counter)
const increment=()=>counter.value++
const a =localStorageWatch()
// const asdFun = () => {
//   unm.value =asd(unm.value)
//   console.log(unm.value)
// }

console.log(a)
</script>
<style scoped lang="scss">
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
